package com.ok.event;

import cn.hutool.core.util.StrUtil;
import com.ok.constant.WsEventEnum;
import com.ok.constant.WsUrlTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 组态监测点数据变动推送-监测点数据变动
 */
@Slf4j
@Service
public class EMSWsPointDataChangeHandle implements WsEvent {
    @Override
    public Object eventHandle(DcomWsSocket ds, String eventParam) {
        if (ds == null || StrUtil.isEmpty(ds.urlType) || ds.session == null || StrUtil.isEmpty(ds.wsSessionId) || StrUtil.isEmpty(ds.token)) {
            return null;
        }
        if (!ds.urlType.equals(WsUrlTypeEnum.tablePointRDataChangeEMS.getCode())) {
            return null;
        }

        log.info("EMSWsPointDataChangeHandle---");
        return null;
    }

    @Override
    public WsEventEnum getCurrEventEnum() {
        return WsEventEnum.pointRDataChange;
    }
}
